package com.achao.backstagemanage.dao;

import com.achao.basecommon.entity.MusicManagerDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 描述：后台管理者相关类-mapper层
 *
 * @Author：yangchao
 * @CreateDate：2023/2/1 21:25
 */
@Repository
@Mapper
public interface MusicManagerDao extends BaseMapper<MusicManagerDO> {

    /** 根据ID查询某个管理人员 */
    public List<MusicManagerDO> queryManagerList(@Param("id") int id);

    /** 分页查询所有管理人员信息 */
    @Select("SELECT * FROM MUSIC_MANAGER")
    public List<MusicManagerDO> queryAllManagerList();

    /** 查询指定管理人员信息 */
    @Select("SELECT * FROM MUSIC_MANAGER WHERE ID = #{id}")
    public MusicManagerDO queryManagerForId(@Param("id") Integer id);
}
